package com.sunday.common.sentinel.study.e6_Nacos;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class SentinelConfig {

    private static final String KEY = "helloAnother";

    @Bean
    public FlowQpsRunner flowQpsRunner(){
        // Assume we config: resource is `TestResource`, initial QPS threshold is 5.
        FlowQpsRunner runner = new FlowQpsRunner(KEY, 1, 100);
        runner.simulateTraffic();
        runner.tick();
        return runner;
    }



}
